package com.longfor.dragonshard.dto.demo;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 
 * @author chi.zhang
 * @create 2017/10/21 下午6:04
 *
 * @version v1.0
 **/
public class DemoAddDTO implements Serializable {
    private static final long serialVersionUID = -1L;

    /**
     * 名称
     */
    @NotBlank
    @Length(min=1, max=30)
    private String name;

    /**
     * 状态：0=不可用，1=正常
     */
    @NotNull
    @Range(min = 0, max = 1)
    private Integer status;

    @Length(max = 200)
    private String remark;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this)
                .append("name", name)
                .append("status", status)
                .append("remark", remark)
                .toString();
    }
}